<template>
	<view class="mykehu p20">
		<myNav>
			<view slot="left" @click="back"><uni-icons type="closeempty" color="#fff"></uni-icons></view>
			<view class="center">待办</view>
		</myNav>
		<darkCalendar></darkCalendar>
		<view class="my-title">今日预约</view>
		<view class="gundong blue"><view class="gundong-item " :class="index==1?'active':''"  @click="gotoinfo(item)" v-for="(item,index) in 100" :key="item">张三 130123456789 楼盘:------- 2019-01-01 21:00</view></view>
		<view class="my-title red">催办</view>
		<view class="gundong red"><view class="gundong-item " :class="index==1?'active':''"  @click="gotoinfo(item)" v-for="(item,index) in 100" :key="item">张三 130123456789 楼盘:------- 2019-01-01 21:00</view></view>
	</view>
</template>

<script>
import { mapMutations } from 'vuex';
import darkCalendar from '@/components/dark-calendar/dark-calendar';
import myNav from '../../components/mynav/mynav.vue';
import { searchedVistor } from '@/api/index.js';
import { MyShow } from '@/util/my.js';
export default {
	components: { myNav, darkCalendar },
	data() {
		return {
			para: ''
		};
	},
	methods: {
		...mapMutations(['back']),
		async searchedVistor() {
			//去请求接口
			//  todo 字段自己填充吧
			// console.log('去请求接口');
			try {
				let reslut = await searchedVistor({
					para: this.para
				});
				//成功
				new MyShow('需要渲染的字段').tixing();
			} catch (e) {
				//TODO handle the exception
				new MyShow('需要渲染的字段').tixing();
			}
		},
		gotoinfo(val) {
			uni.navigateTo({
				url: './p11'
			});
		},
		goto(val) {
			switch (+val) {
				case 1:
					uni.navigateTo({
						url: './p10'
					});
					break;
				case 2:
					break;
				case 3:
					break;
				case 4:
					break;
				default:
					break;
			}
		}
	}
};
</script>

<style lang="scss">
@import './main.scss';
.myright {
	display: flex;
	flex-direction: column;
	image {
		width: 20px;
		height: 20px;
	}
	margin-top: 40px;
	align-items: center;
	color: #ffffff;
	text {
		margin-top: 5px;
	}
}
</style>
